package com.book.scc.service;

import com.book.scc.mapper.BookMapper;
import com.book.scc.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookService {
    @Autowired
    private BookMapper bookMapper;
    public List queryBooks(String bookname) {
        return bookMapper.queryBooks(bookname);
    }

    public Book queryBookById(int id) {
        return bookMapper.queryBookById(id);

    }

    public int deleteBook(int id) {
        return bookMapper.deleteBook(id);
    }

    public int updateBook(Book book) {
        return bookMapper.updateBook(book);
    }

    public int queryAdd(Book book) {
        return bookMapper.queryAdd(book);
    }
}
